/**
@file     	DESIGNPATTERN_Directory.h
@brief    	1.When the algorithm to create complex object should be independent of the part of the object,
as well as their assembly;
2.When construction process must be allowed to construct the object is different;
@author  	arvin
@version 	1.0   2012/12/20
*/

#ifndef CXX_DESIGNPATTERN_DIRECTORY_H
#define CXX_DESIGNPATTERN_DIRECTORY_H

#ifndef CXX_DESIGNPATTERN_ENTRY_H
#include "DESIGNPATTERN_Entry.h"
#endif

#include <list>

using namespace std;

class Directory : public Entry
{
public:
	/**
	* Construction
	*
	* @param const string& strName
	* @param int iSize
	* @return
	*/
	Directory(const string& strName, int iSize);

	/**
	* Destruction
	*
	* @param VOID
	* @return
	*/
	virtual ~Directory();

	/**
	* PrintList
	*
	* @param VOID
	* @return VOID
	*/
	virtual VOID PrintList();

	/**
	* GetSize
	*
	* @param VOID
	* @return int
	*/
	virtual int GetSize();

	/**
	* Add
	*
	* @param Entry* pEntry
	* @return bool
	*/
	virtual bool Add(Entry* pEntry);

	/**
	* Remove
	*
	* @param Entry* pEntry
	* @return bool
	*/
	virtual bool Remove(Entry* pEntry);

	/**
	* GetChild
	*
	* @param VOID
	* @return list<Entry*>
	*/
	virtual list<Entry*> GetChild();

protected:
private:
	/**
	* Construction
	*
	* @param VOID
	* @return
	*/
	Directory();

	/**
	* Copy Construction
	*
	* @param const Directory& cDirectory
	* @return
	*/
	Directory(const Directory& cDirectory);

	/**
	* Assignment
	*
	* @param const Directory& cDirectory
	* @return Directory&
	*/
	Directory& operator=(const Directory& cDirectory);

public:
protected:
private:
	list<Entry*> m_listEntry;
};

#endif	/* >>CXX_DESIGNPATTERN_DIRECTORY_H<< */
/* EOF */